#include <iostream>
#include <csignal>

#include "CmdManager.h"

CmdManager cmd_manager;

void sigHandler(int sigNum) {
	std::cerr << "signal SIGPIPE, server is down" << std::endl;
	cmd_manager.onSignal();
}

int main(int argc, char **argv) {
	signal(SIGPIPE, sigHandler);
	return cmd_manager.mainLoop();
}
